package beautiful.butterfly.drds.schedule.task;

import beautiful.butterfly.drds.schedule.TaskItem;
import beautiful.butterfly.drds.schedule.strategy.factory.ManageFactory;
import beautiful.butterfly.drds.schedule.task.schedule_manager.Manager;

import java.util.List;

public class ManagerDynamic extends Manager {
    //private static transient Log logger = LogFactory.getLog(ManagerDynamic.class);

    ManagerDynamic(ManageFactory aFactory,
                   String baseTaskType, String ownSign, int managerPort,
                   String jxmUrl, IDataManager aScheduleCenter) throws Exception {
        super(aFactory, baseTaskType, ownSign, aScheduleCenter);
    }

    public void initial() throws Exception {
        if (scheduleCenter.isLeader(this.currenServer.getUuid(),
                scheduleCenter.loadScheduleServerNames(this.currenServer.getTaskType()))) {
            // �ǵ�һ������������Ӧ��zkĿ¼�Ƿ����
            this.scheduleCenter.initialRunningInfo4Dynamic(this.currenServer.getBaseTaskType(),
                    this.currenServer.getOwnSign());
        }
        computerStart();
    }

    public void refreshServerInfo() throws Exception {
        throw new Exception("û��ʵ��");
    }

    public boolean isNeedReLoadTaskItemList() throws Exception {
        throw new Exception("û��ʵ��");
    }

    public void assignScheduleTask() throws Exception {
        throw new Exception("û��ʵ��");

    }

    public List<TaskItem> getCurrentScheduleTaskItemList() {
        throw new RuntimeException("û��ʵ��");
    }

    public int getTaskItemCount() {
        throw new RuntimeException("û��ʵ��");
    }
}
